    <html>
    <body>
     
    <?php
  
   //get form data
	$username = $_POST['username'];
	$password = $_POST['password'];
	if($username&&$password){
	include("connect.php");
	
	$query=mysql_query("SELECT * FROM users WHERE username='$username' and password='$password' and status='admin'");
	$numrows=mysql_num_rows($query);
	
	if($numrows!=0){
	
	header("location:admin.php");
	}
	else
		echo "You are not Admin!!!  <a href='adminlogin.php'>Click</a>  here to try again.";
	}
	else 
	echo "Please Enter Username and Password!!!  <a href='adminlogin.php'>Click</a>  here to try again.";

	?>       
    </body>
    </html>